COVID-19 ဗိုင်းရပ်၏အမည်မှာ Severe Acute Respiratory Syndrome Coronavirus 2 (SARS-CoV-2) ဖြစ်ပြီးထိုဗိုင်းရပ်ကြောင့်ဖြစ်သောရောဂါကို coronavirus disease(COVID-19) ဟုခေါ်ပါသည်။ Corona ဟူသောစကားလုံးသည် Latin ဘာသာဖြင့်ရေးသားထားခြင်းဖြစ်ပြီး English လို Crown ဟုအဓိပ္ပါယ်ရပါသည်။ ဗိုင်းရပ်၏ပုံသဏ္ဍပေါ်အခြေခံ၍ရေးသားခြင်းဖြစ်ပါသည်။ ဗိုင်းရပ်၏အမည်ပေးခြင်းကို International Committee on Taxonomy of Viruses (ICTV) မှပြုလုပ်ပြီး ရောဂါ၏အမည်ပေးခြင်းကို WHO မှပြုလုပ်ခြင်းဖြစ်ပါသည်။

WHO'S NAMING-and-the-virus-that-causes-it)
COVID-19 ရောဂါနှင့်ပတ်သက်၍လေ့လာတွေ့ရှိမှု့အသစ်
COVID-19 ရောဂါကြောင့်ဖြစ်ပေါ်လာသောရောဂါလက္ခဏာအသစ်(COVID toes)
အထက်ပါ website များမှတဆင့်သတင်းအချက်အလက်များရယူနိင်ပါသည်။
%store -r __importing_Lib
__importing_Lib
import matplotlib as mpl
from matplotlib.legend import Legend
from folium import plugins
from graphviz import Digraph
import os
import datetime
os.environ["PATH"] += os.pathsep + 'C:/Program Files/Graphviz2.38/bin/'
mpl.rcParams['xtick.minor.size'] = 0
mpl.rcParams['xtick.minor.width'] = 0
mpl.rcParams['ytick.minor.size'] = 0
mpl.rcParams['ytick.minor.width'] = 0
covid_df = pd.read_excel('covid/COVID-19-2020-05-06.xlsx', parse_dates=['dateRep'])
covid_df.rename(columns={'countryterritoryCode': 'Country_Code'}, inplace=True)
print(covid_df.shape)
cc_dict = {
'Anguilla': 'AIA', 'Bonaire, Saint Eustatius and Saba': 'BES',
'Czechia': 'CZE', 'Falkland_Islands_(Malvinas)': 'FLK'
}
covid_df.query('countriesAndTerritories!=["Cases_on_an_international_conveyance_Japan"]', inplace=True)
for c_name, c_code in cc_dict.items():
covid_df.loc[covid_df.countriesAndTerritories==c_name, 'Country_Code'] = c_code
print(covid_df.shape)
start_date = covid_df.dateRep.min().strftime('%d-%m-%Y')
last_date = covid_df.dateRep.max().strftime('%d-%m-%Y')
print(f'start_date: {start_date}', f'last_date : {last_date}', sep='\n')
total_death = covid_df.deaths.sum()
total_cases = covid_df.cases.sum()
overall_death_rate = total_death / total_cases * 100
print(f'total_death: {total_death:7,}\ntotal_cases: {total_cases:7,}\noverall_death_rate: {overall_death_rate:.3f}%')
covid_df.head()
region_df = pd.read_csv('life_expectancy/Metadata_Country.csv', usecols=[0, 1, 2])
region_df.columns = 'Country_Code', 'Region', 'IncomeGroup'
region_df.dropna(subset=['IncomeGroup'], inplace=True)
region_df.head()
region_dict = {'Anguilla': ['Latin America & Caribbean', 'High income'],
'Bonaire, Saint Eustatius and Saba': ['Latin America & Caribbean', 'High income'],
'Falkland_Islands_(Malvinas)': ['Latin America & Caribbean', 'High income'],
'Guernsey': ['Europe & Central Asia', 'High income'],
'Holy_See': ['Europe & Central Asia', 'High income'],
'Jersey': ['Europe & Central Asia', 'High income'],
'Montserrat': ['Latin America & Caribbean', 'Upper middle income'],
'Taiwan': ['East Asia & Pacific', 'High income']
}
merge_df = covid_df.merge(region_df, on='Country_Code', how='left')
for cname, (reg, level) in region_dict.items():
merge_df.loc[merge_df.countriesAndTerritories==cname, ['Region', 'IncomeGroup']] = reg, level
col_to_keep = ['dateRep', 'cases', 'deaths', 'Country_Name', 'Region', 'IncomeGroup']
merge_df = merge_df.rename(columns={'countriesAndTerritories': 'Country_Name'}).loc[:, col_to_keep]
merge_df.head()
country_df = (merge_df.groupby(['Country_Name', 'IncomeGroup'])
.agg({'cases': 'sum', 'deaths': 'sum'})
.reset_index([0, 1]))
country_df.Country_Name.replace({'Democratic_Republic_of_the_Congo': 'Congo', 'United_States_of_America': 'USA'},
inplace=True)
country_df['c_proportion'] = country_df.cases / total_cases * 100
country_df['d_proportion'] = country_df.deaths / total_death * 100
country_df['death_rate'] = country_df.deaths / country_df.cases * 100
country_df.sort_values(['d_proportion', 'c_proportion', 'death_rate'], ascending=False).head()
case_name_lst = []
case_quan_lst = []
fig, ((ax1, ax2), (ax3, ax4))= plt.subplots(2, 2, figsize=(14, 9))
income_grp = country_df.groupby('IncomeGroup')
for g_name, grp in income_grp:
temp = grp.sort_values('cases').tail()
case_name_lst.append(temp.Country_Name.iloc[-1])
case_quan_lst.append(temp.cases.iloc[-1])
ax = (ax1 if g_name=='High income' else ax2
if g_name=='Upper middle income' else ax3
if g_name=='Lower middle income' else ax4)
ax.set_title(g_name, y=1.035, fontdict={'weight':'bold'})
ax.barh(temp.Country_Name, temp.cases, color='steelblue')
ax.set_xlabel('Number of patients', fontdict={'weight':'bold'})
ax.xaxis.set_label_coords(0.5, -0.123)
for i, v in enumerate(temp.cases):
x = (v-225_000 if v > 1_200_000 else v-185_000 if v > 200_000 else v-180_000 if v > 190_000 else v-162_000
if v > 163_000 else v-24_000 if v > 100_000 else v-20_500 if v > 80_000 else v-6_500
if v > 10_000 else v-360 if v > 1_500 else v-250)
ax.text(x, i-0.1, f'{v:,}', color='white', weight='bold')
plt.subplots_adjust(top=0.85, wspace=0.3, hspace=0.5)
fig.text(.5, 0.925, f'\nCOVID-19 Patients of all countries are analysed by IncomeGroup from \
{start_date} to {last_date}',
fontdict={'size':'x-large', 'weight':'semibold', 'ha':'center'})
fig.text(.5, 0.05, 'Fig_01',
fontdict={'size':'x-large', 'weight':'semibold', 'ha':'center'});
cases_df = country_df.set_index('Country_Name').cases.sort_values().tail(10)
fig, ax= plt.subplots(1, 1, figsize=(10, 7))
ax.barh(cases_df.index, cases_df, color='steelblue')
for i, v in enumerate(cases_df):
x = (v-137_000 if v > 1_100_000 else v-112_000 if v > 120_000 else v-110_000
if v > 100_000 else v-91_500)
ax.text(x, i-0.1, f'{v:,}', color='white', weight='bold')
ax.set_yticklabels(cases_df.index, fontdict={'weight':'bold'})
ax.set_xlabel('Number of patients\nFig_02', fontdict={'weight':'bold'})
ax.set_title(f'COVID_19 patients of top ten countries from {start_date} to {last_date}',
y=1.025, fontdict={'weight':'bold'})
ax.xaxis.set_label_coords(0.5, -0.07)
top_cases = (country_df.sort_values('cases', ascending=False, ignore_index=True)
[['Country_Name', 'cases', 'c_proportion']].head(3))
fcn, scn, tcn = top_cases.Country_Name
fcq, scq, tcq = top_cases.cases
fcp, scp, tcp = top_cases.c_proportion
top_cases
death_name_lst = []
death_quan_lst = []
fig, ((ax1, ax2), (ax3, ax4))= plt.subplots(2, 2, figsize=(14, 9))
for g_name, grp in income_grp:
temp = grp.sort_values('deaths').tail()
death_name_lst.append(temp.Country_Name.iloc[-1])
death_quan_lst.append(temp.deaths.iloc[-1])
ax = (ax1 if g_name=='High income' else ax2
if g_name=='Upper middle income' else ax3
if g_name=='Lower middle income' else ax4)
ax.set_title(g_name, y=1.035, fontdict={'weight':'bold'})
ax.barh(temp.Country_Name, temp.deaths, color='steelblue')
ax.set_xlabel('Number of patients', fontdict={'weight':'bold'})
ax.xaxis.set_label_coords(0.5, -0.123)
for i, v in enumerate(temp.deaths):
x = (v-9_500 if v > 24_000 else v-900 if v > 2_000 else v-190 if v > 1_100 else v-130
if v > 300 else v-5.5)
ax.text(x, i-0.1, f'{v:,}', color='white', weight='bold')
plt.subplots_adjust(top=0.85, wspace=0.3, hspace=0.5)
fig.text(.5, 0.925, f'\nDeaths of COVID-19 Patients of all countries are analysed by IncomeGroup from \
{start_date} to {last_date}',
fontdict={'size':'x-large', 'weight':'semibold', 'ha':'center'})
fig.text(.5, 0.05, 'Fig_03',
fontdict={'size':'x-large', 'weight':'semibold', 'ha':'center'});
deaths_df = country_df.set_index('Country_Name').deaths.sort_values().tail(10)
fig, ax= plt.subplots(1, 1, figsize=(10, 7))
ax.barh(deaths_df.index, deaths_df, color='steelblue')
for i, v in enumerate(deaths_df):
x = v-5_800 if v > 25_000 else v-4_800
ax.text(x, i-0.1, f'{v:,}', color='white', weight='bold')
ax.set_yticklabels(deaths_df.index, fontdict={'weight':'bold'})
ax.set_xlabel('Number of deaths\nFig_04', fontdict={'weight':'bold'})
ax.set_title(f'Ten highest death toll countries from {start_date} to {last_date}',
y=1.02, fontdict={'weight':'bold'})
ax.xaxis.set_label_coords(0.5, -0.07)
top_deaths = (country_df.sort_values('deaths', ascending=False, ignore_index=True)
[['Country_Name', 'deaths', 'd_proportion']].head(3))
fdn, sdn, tdn = top_deaths.Country_Name
fdq, sdq, tdq = top_deaths.deaths
fdp, sdp, tdp = top_deaths.d_proportion
top_deaths
drate_name_lst = []
drate_quan_lst = []
fig, ((ax1, ax2), (ax3, ax4))= plt.subplots(2, 2, figsize=(14, 9))
for g_name, grp in income_grp:
temp = grp.sort_values('deaths', ascending=False).head(10).sort_values('death_rate').tail()
drate_name_lst.append(temp.Country_Name.iloc[-1])
drate_quan_lst.append(temp.death_rate.iloc[-1])
ax = (ax1 if g_name=='High income' else ax2
if g_name=='Upper middle income' else ax3
if g_name=='Lower middle income' else ax4)
ax.set_title(g_name, y=1.035, fontdict={'weight':'bold'})
ax.barh(temp.Country_Name, temp.death_rate, color='steelblue')
ax.set_xlabel('Death rate', fontdict={'weight':'bold'})
ax.xaxis.set_label_coords(0.5, -0.123)
for i, v in enumerate(temp.death_rate):
x = (v-2.72 if g_name == 'High income' else v-1.4 if g_name == 'Upper middle income' and v > 10
else v-1.2 if g_name == 'Upper middle income' else v-1.72 if g_name == 'Low income' and v >= 10
else v-1.48 if g_name == 'Low income' else v-0.9)
ax.text(x, i-0.1, f'{v:.2f}%', color='white', weight='bold')
plt.subplots_adjust(top=0.85, wspace=0.33, hspace=0.5)
fig.text(.5, 0.925, f'\nDeath rate of COVID-19 Patients of top five countries for each IncomeGroup from \
{start_date} to {last_date}',
fontdict={'size':'x-large', 'weight':'semibold', 'ha':'center'})
fig.text(.5, 0.05, 'Fig_05',
fontdict={'size':'x-large', 'weight':'semibold', 'ha':'center'});
death_rate_df = country_df.sort_values('deaths').tail(10)
death_rate_ten = death_rate_df.set_index('Country_Name').death_rate.sort_values().tail(10)
fig, ax= plt.subplots(1, 1, figsize=(10, 7))
ax.barh(death_rate_ten.index, death_rate_ten, color='steelblue')
for i, v in enumerate(death_rate_ten):
x = v-1.65 if v > 11 else v-1.4
ax.text(x, i-0.1, f'{v:.2f}%', color='white', weight='bold')
ax.set_yticklabels(death_rate_ten.index, fontdict={'weight':'bold'})
ax.set_xlabel('Death rate\nFig_06', fontdict={'weight':'bold'})
ax.set_title(f'Ten highest death rate countries from {start_date} to {last_date}',
y=1.02, fontdict={'weight':'bold'})
ax.xaxis.set_label_coords(0.5, -0.07)
drate_df = death_rate_ten.tail(3)
trn, srn, frn = drate_df.index
tr, sr, fr = drate_df
print(f'USA: {death_rate_ten["USA"]}')
drate_df
color_dict = {'cases': 'orange', 'deaths': 'red', 'death_rate': 'steelblue'}
cumsum_df = covid_df.groupby('dateRep')[['cases', 'deaths']].sum().cumsum()
cumsum_df.query('deaths > 0', inplace=True)
cumsum_df['death_rate'] = cumsum_df.deaths / cumsum_df.cases * 100
temp_first_date = cumsum_df.index.min().strftime('%d-%m-%Y')
fig, ax= plt.subplots(1, 1, figsize=(10, 7))
ax.plot(cumsum_df.index, cumsum_df.death_rate, color='steelblue')
ax.set_ylabel('Death rate', fontdict={'weight':'bold'})
ax.set_xlabel('Date\nFig_07', fontdict={'weight':'bold'})
ax.set_title(f'COVID-19 Death rate for the whole world from {temp_first_date} to {last_date}',
y=1.02, fontdict={'weight':'bold'})
ax.xaxis.set_label_coords(0.5, -0.07)
max_day = cumsum_df.death_rate.idxmax()
min_day = cumsum_df.death_rate.idxmin()
max_drate = cumsum_df.loc[max_day].death_rate
min_drate = cumsum_df.loc[min_day].death_rate
print(min_day.strftime('%d-%m-%Y'), min_drate)
print(max_day.strftime('%d-%m-%Y'), max_drate)
pd.concat([cumsum_df.head(1), cumsum_df.tail(1)])
period_df = covid_df.groupby('dateRep').agg({'cases': 'sum', 'deaths': 'sum'})
cases_max_day = period_df.cases.idxmax()
deaths_max_day = period_df.deaths.idxmax()
print('Cases:', cases_max_day.strftime('%d-%m-%Y'), f'{period_df.loc[cases_max_day].cases:>8,}')
print('Deaths:', deaths_max_day.strftime('%d-%m-%Y'), f'{period_df.loc[deaths_max_day].deaths:>7,}')
period_df.head()
fig, ax= plt.subplots(1, 1, figsize=(12, 7))
ax.plot(period_df.cases, color='steelblue')
ax.plot(period_df.deaths, color='red')
ax.semilogy()
ax.set_yticklabels([0.01, 0.1, '1', '10', '100', '1,000', '10,000', '100,000'])
ax.set_xlabel('Date\nFig_08', fontdict={'weight':'bold'})
ax.set_title(f'Infected and death of people around the world by COVID_19 from {start_date} to {last_date}',
y=1.02, fontdict={'weight':'bold'})
ax.set_ylabel('Number of people', fontdict={'weight':'bold'})
plt.setp(ax.get_xticklabels(), weight='bold')
ax.xaxis.set_label_coords(0.5, -0.07);

COVID-19 ရောဂါကူးစက်ခံရသူ၊ သေဆုံးသူများ၏အရေအတွက်နှင့်ပတ်သက်သော သတင်းအချက်အလက်ကို European Centre for Disease Prevention and Control (ECDC) မှရယူခဲ့ပါသည်။
31-12-2019 မှ 06-05-2020 အထိတစ်ကမ္ဘာလုံး၌ COVID-19 ရောဂါကူးစက်ခံရသူအရေအတွက်မှာ 3,623,107 ယောက်ဖြစ်ပြီး သေဆုံးသူအရေအတွက်မှာ 256,873 ယောက်ဖြစ်ပါသည်။ ပျမ်းမျှသေဆုံးနှုန်းမှာ 7.09% ဖြစ်ပါသည်။
ဝင်ငွေအုပ်စုအလိုက် COVID-19 ရောဂါကူးစက်ခံရမှု့ကိုလေ့လာကြည့်ရာ၌ မြင့်ဆုံးဝင်ငွေအုပ်စုတွင် အရေအတွက် 1,204,475 ယောက်ဖြင့် USA မှလည်းကောင်း ၊ အလယ်အလတ်အမြင့်ဝင်ငွေအုပ်စုတွင် အရေအတွက် 155,370 ယောက်ဖြင့် Russia မှလည်းကောင်း ၊ အလယ်အလတ်အနိမ့်ဝင်ငွေအုပ်စုတွင် အရေအတွက် 49,391 ယောက်ဖြင့် India မှလည်းကောင်း၊ အနိမ့်ဆုံးဝင်ငွေအုပ်စုတွင် အရေအတွက် 3,224 ယောက်ဖြင့် Afghanistan တို့သည်ရောဂါကူးစက်ခံရမှု့အမြင့်ဆုံးတိုင်းပြည်များဖြစ်ပါသည်(Fig_01)။
တစ်ကမ္ဘာလုံးအနေဖြင့်လေ့လာကြည့်လျှင် ရောဂါကူးစက်ခံရသူအရေအတွက်အများဆုံးတိုင်းပြည်မှာ USA ဖြစ်ပြီး အရေအတွက်အားဖြင့် 1,204,475 (33.24%) ယောက်ဖြစ်ပါသည်။ ဒုတိယနှင့်တတိယရောဂါကူးစက်ခံရသူအရေအတွက်အများဆုံးတိုင်းပြည်များမှာ Spain နှင့် Italy တို့ဖြစ်ပြီး အရေအတွက်အားဖြင့် 219,329 (6.05%) နှင့် 213,013 (5.88%) ယောက်တို့ဖြစ်ပါသည်(Fig_02)။
COVID-19 ရောဂါကြောင့်သေဆုံးမှု့အား ဝင်ငွေအုပ်စုအလိုက်လေ့လာကြည့်ရာ၌ မြင့်ဆုံးဝင်ငွေအုပ်စုတွင် အရေအတွက် 71,078 ယောက်ဖြင့် USA မှလည်းကောင်း ၊ အလယ်အလတ်အမြင့်ဝင်ငွေအုပ်စုတွင် အရေအတွက် 7,921 ယောက်ဖြင့် Brazil မှလည်းကောင်း ၊ အလယ်အလတ်အနိမ့်ဝင်ငွေအုပ်စုတွင် အရေအတွက် 1,694 ယောက်ဖြင့် India မှလည်းကောင်း၊ အနိမ့်ဆုံးဝင်ငွေအုပ်စုတွင် အရေအတွက် 95 ယောက်ဖြင့် Afghanistan တို့သည်သေဆုံးမှု့အမြင့်ဆုံးတိုင်းပြည်များဖြစ်ပါသည်(Fig_03)။
COVID-19 ရောဂါကြောင့်သေဆုံးသူအရေအတွက်အား တစ်ကမ္ဘာလုံးအနေဖြင့်လေ့လာကြည့်တွင် သေဆုံးမှု့အများဆုံးတိုင်းပြည်မှာ USA ဖြစ်ပြီး အရေအတွက်အားဖြင့် 71,078 (27.67%) ယောက်ဖြစ်ပါသည်။ ဒုတိယနှင့်တတိယသေဆုံးသူအရေအတွက်အများဆုံးတိုင်းပြည်များမှာ United_Kingdom နှင့် Italy တို့ဖြစ်ပြီး အရေအတွက်အားဖြင့် 29,427 (11.46%) နှင့် 29,315 (11.41%) ယောက်တို့ဖြစ်ကြပါသည်(Fig_04)။
ဝင်ငွေအုပ်စုအလိုက် COVID-19 ရောဂါကြောင့်သေဆုံးသူအရေအတွက်အများဆုံးတိုင်းပြည် 10 ခုအားရွှေးထုတ်ပြီးနောက် နိင်ငံအလိုက်သေဆုံးနှုန်းအားလေ့လာကြည့်ရာ၌ မြင့်ဆုံးဝင်ငွေအုပ်စုတွင် 19.20% ဖြင့် France မှလည်းကောင်း ၊ အလယ်အလတ်အမြင့်ဝင်ငွေအုပ်စုတွင် 9.71% ဖြင့် Algeria မှလည်းကောင်း ၊ အလယ်အလတ်အနိမ့်ဝင်ငွေအုပ်စုတွင် 7.22% ဖြင့် Indonesia မှလည်းကောင်း၊ အနိမ့်ဆုံးဝင်ငွေအုပ်စုတွင် 11.88% ဖြင့် Haiti တို့သည်သေဆုံးနှုန်းအမြင့်ဆုံးတိုင်းပြည်များဖြစ်ပါသည်(Fig_05)။
COVID-19 ရောဂါကြောင့်သေဆုံးသူအရေအတွက်အများဆုံးတိုင်းပြည် 10 ခုအားရွှေးထုတ်ပြီးနောက် ထိုတိုင်းပြည်တစ်ခုချင်းအလိုက်သေဆုံးနှုန်းအားတွက်ထုတ်ကြည့်ရာတွင် France သည်သေဆုံးနှုန်းအမြင့်ဆုံးတိုင်းပြည်ဖြစ်ပြီး 19.20% ဖြစ်ပါသည်။ ထို့နောက် 15.87% ဖြင့် Belgium သည်လည်းကောင်း၊ 15.09% ဖြင့် United_Kingdom တို့သည်ဒုတိယနှင့်တတိယသေဆုံးနှုန်းအမြင့်ဆုံးတိုင်းပြည်များဖြစ်ကြောင်းလေ့လာတွေ့ရှိရသည်။ COVID-19 ရောဂါကြောင့်သေဆုံးသူအရေအတွက်အများဆုံးတိုင်းပြည်ဖြစ်သော USA ၏သေဆုံးနှုန်းမှာ 5.90% ဖြစ်ပါသည်(Fig_06)။
တစ်ကမ္ဘာလုံး၌ COVID-19 ရောဂါကြောင့်အနည်းဆုံးပျမ်းမျှသေဆုံးနှုန်းမှာ 20-01-2020 တွင် 1.26% ဖြစ်ပြီးအမြင့်သေဆုံးနှုန်းမှာ 25-04-2020 တွင် 7.29% ကြောင်းလေ့လာတွေ့ရှိရပါသည်(Fig_07)။
တစ်ကမ္ဘာလုံး၌ COVID-19 ရောဂါကူးဆက်ခံရသူနှင့်သေဆုံးသူအရေအတွက်အား နေ့အလိုက်လေ့လာကြည့်ရာတွင် 26-04-2020 သည်ရောဂါကူးဆက်ခံမှု့အများဆုံးနေ့ဖြစ်ပြီး အရေအတွက်အားဖြင့် 101,533 ယောက်ဖြစ်ပါသည်။ 16-04-2020 သည်သေဆုံးသူအရေအတွက်အများဆုံးနေ့ဖြစ်ခဲ့ပြီး 10,520 ယောက်သေဆုံးကြောင်းလေ့လာတွေ့ရှိရပါသည်(Fig_08)။
myan_df = pd.read_excel('covid\covid_19.xlsx', index_col='Case_no').drop('Is_Checked', axis=1)
myan_df.Adult.replace({0:'Minor', 1:'Majority'}, inplace=True)
myan_df.Hospital.replace({'South Okkalapa Women & Children Hospital':
'South Okkalapa Specialist Hospital'}, inplace=True)
m_start_date = myan_df.Confirm_date.min().strftime('%d-%m-%Y')
m_last_date = myan_df.Confirm_date.max().strftime('%d-%m-%Y')
number_of_patients = myan_df.Age.count()
number_of_periods = (covid_df.dateRep.max() - myan_df.Confirm_date.min()).days + 1
average_rate = number_of_patients / number_of_periods
age_min = myan_df.Age.min()
age_max = myan_df.Age.max()
print(f'start_date: {m_start_date}', f'last_date case found : {m_last_date}', sep='\n')
print(f'Total number of patients: {number_of_patients}')
print(f'Total number of periods: {number_of_periods}')
print(f'Average confirm cases per day: {average_rate:.2f}')
print(f'Minimum_age: {age_min}', f'Maximum_age : {age_max}', sep='\n')
myan_df.head()
cd_df = myan_df.groupby('Confirm_date')['Gender'].count()#.cumsum()
cd_df.index = cd_df.index.strftime('%d-%m-%Y')
cd_df.name = 'Total'
pop_max_day = cd_df.idxmax()
cmax_pop = cd_df.loc[pop_max_day]
print(pop_max_day, cmax_pop)
fig, ax= plt.subplots(1, 1, figsize=(14, 7))
ax.bar(cd_df.index, cd_df, color='steelblue')
for tup in cd_df.reset_index().itertuples():
x = tup.Index-0.15 if tup.Total < 10 else tup.Index-0.28
y = tup.Total
ax.text(x, (y-0.95 if y > 1 else y-0.75), f'{tup.Total}', color='white', weight='bold')
ax.set_xlim(-0.8, len(cd_df)-0.2)
ax.set_ylabel('Number of case', fontdict={'weight':'bold'})
ax.set_xlabel('Fig_09', fontdict={'weight':'bold'})
ax.set_title(f'COVID-19 Daily total case for Myanmar from {m_start_date} to {last_date}',
y=1.02, fontdict={'weight':'bold'})
ax.xaxis.set_label_coords(0.5, -0.18)
ax.set_xticklabels(cd_df.index, rotation = 45, ha='right', fontdict={'weight':'bold'});
n = 5
count, bin_edges = np.histogram(myan_df.Age, bins=n)
age_idx = count.argsort()
portion = count/count.sum() * 100
print(myan_df.Age.sort_values().values, count, bin_edges, portion, sep='\n')
gender_df = myan_df.Gender.value_counts().reset_index()
gender_df.columns = 'Gender', 'Total'
gender_df['Proportion'] = gender_df.Total / number_of_patients * 100
m_prop = gender_df.query('Gender=="Male"').iloc[0,-1]
f_prop = gender_df.query('Gender=="Female"').iloc[0,-1]
gender_df
adult_df = myan_df.Adult.value_counts().reset_index()
adult_df.columns = 'Adult', 'Total'
adult_df['Proportion'] = adult_df.Total / number_of_patients * 100
maj_prop = adult_df.query("Adult=='Majority'").iloc[0,-1]
min_prop = adult_df.query("Adult=='Minor'").iloc[0,-1]
adult_df
condition_df = myan_df.Condition.value_counts().reset_index()
condition_df.columns = 'Condition', 'Total'
condition_df.loc[0, 'Total'] = condition_df.Total[0] - 7
condition_df.loc[1, 'Total'] = condition_df.Total[1] + 7
condition_df['Proportion'] = condition_df.Total / number_of_patients * 100
_, rq, rec_prop = condition_df.query("Condition=='Recovery'").iloc[0]
_, dq, dth_prop = condition_df.query("Condition=='Death'").iloc[0]
condition_df
infection_df = myan_df.Infection_type.value_counts().reset_index()
infection_df.columns = 'Infection_type', 'Total'
infection_df['Proportion'] = infection_df.Total / number_of_patients * 100
loc_prop = infection_df.query("Infection_type=='Local'").iloc[0,-1]
for_prop = infection_df.query("Infection_type=='Foreign'").iloc[0,-1]
infection_df
fig, ((ax1, ax2, ax3), (ax4, ax5, ax6))= plt.subplots(2, 3, figsize=(12, 8))
myan_df.Age.plot.hist(bins=n, xticks=bin_edges, color='steelblue', ax=ax1)
ax1.set_ylabel('Number of patients', fontdict={'weight':'bold'})
ax1.set_xlim(myan_df.Age.min()-1, myan_df.Age.max()+1)
ax1.yaxis.set_label_coords(-0.13, 0.5)
ax1.set_title('Age of Patients', y=1.035, fontdict={'weight':'bold'})
sns.categorical.countplot('Gender', data=myan_df, palette=['orange', 'steelblue'],
ax=ax2, order=['Female', 'Male'])
ax2.set(xlabel=None, ylabel=None)
ax2.set_title('Gender of Patients', y=1.035, fontdict={'weight':'bold'})
sns.categorical.countplot('Adult', data=myan_df, palette=['orange', 'steelblue'],
ax=ax3, order=['Minor', 'Majority'])
ax3.set(xlabel=None, ylabel=None)
ax3.set_title('Adult of Patients', y=1.035, fontdict={'weight':'bold'})
sns.categorical.countplot('Condition', data=myan_df, palette=['red', 'green', 'steelblue'],
ax=ax4, order=['Death', 'Recovery', 'Normal'])
ax4.set(xlabel=None)
ax4.set_ylabel('Number of patients', fontdict={'weight':'bold'})
ax4.yaxis.set_label_coords(-0.13, 0.5)
ax4.set_title('Condition of Patients', y=1.035, fontdict={'weight':'bold'})
sns.categorical.countplot('Infection_type', data=myan_df, palette=['orange', 'steelblue'],
ax=ax5, order=['Local', 'Foreign'])
ax5.set(xlabel=None, ylabel=None)
ax5.set_title('Infection type of Patients', y=1.035, fontdict={'weight':'bold'})
sns.categorical.countplot('Remark', data=myan_df, palette=['slateblue', 'orange', 'steelblue'],
ax=ax6, order=['Dual citizen', 'Foreigner', 'National'])
ax6.set(xlabel=None, ylabel=None)
ax6.set_title('Nationality of Patients', y=1.035, fontdict={'weight':'bold'})
plt.subplots_adjust(top=0.85, wspace=0.3, hspace=0.4)
fig.text(.5, 0.925, f'\nCOVID-19 Patients of Myanmar are analysed by each attribute from \
{m_start_date} to {last_date}',
fontdict={'size':'x-large', 'weight':'semibold', 'ha':'center'})
fig.text(.5, 0.05, 'Fig_10',
fontdict={'size':'x-large', 'weight':'semibold', 'ha':'center'});
tsp_df = myan_df.query('State=="Yangon"').Address.value_counts().reset_index()
tsp_df.columns = 'Township', 'Total'
tsp_df.sort_values(['Total', 'Township'], ignore_index=True, inplace=True)
tsp_df.Township = tsp_df.Township.str.replace(' Township', '')
fig, ax= plt.subplots(1, 1, figsize=(14, 8))
ax.bar(tsp_df.Township, tsp_df.Total, color='steelblue', width=0.9)
for tup in tsp_df.itertuples():
x = tup.Index-0.1 if tup.Total < 10 else tup.Index-0.25
y = tup.Total
ax.text(x, (y-0.95 if y > 1 else y-0.75), f'{tup.Total}', color='white', weight='bold')
ax.set_xlim(-.8, len(tsp_df)-0.2)
ax.set_ylabel('Number of patients', fontdict={'weight':'bold'})
ax.set_xlabel('Fig_11', fontdict={'weight':'bold'})
ax.set_title(f'COVID-19 patients in each area of Yangon from {m_start_date} to {last_date}',
y=1.02, fontdict={'weight':'bold'})
ax.set_xticklabels(tsp_df.Township, rotation = 45, ha='right', fontdict={'weight':'bold'});
state_df = myan_df.State.value_counts().reset_index()
state_df.columns = 'State', 'Total'
state_min = state_df.Total.min()
state_max = state_df.Total.max()
state_df['Proportion'] = state_df.Total / number_of_patients * 100
state_df['norm'] = np.log(state_df.Total)
st_name, st_prop = state_df.Total.iloc[0], state_df.Proportion.iloc[0]
state_df
myan_map = folium.Map(location=[19.9940,96.0864],
tiles='StamenToner',
zoom_start=5)
folium.Choropleth(
geo_data='myanmar(original).json',
data=state_df,
columns=['State', 'norm'],
bins=4,
key_on='feature.properties.ST',
nan_fill_color='white',
line_color='black',
fill_color='Paired',
fill_opacity=1,
line_opacity=0.5,
legend_name ='COVID-19',
name="COVID-19 patients of each state",
overlay=True,
highlight = True).add_to(myan_map)
folium.LayerControl().add_to(myan_map)
myan_map.save('Myanmar_covid-19_map.html')
myan_map
myan2_map = folium.Map([19.9940,96.0864],zoom_start=5)
cluster = plugins.MarkerCluster().add_to(myan2_map)
host_lst = ['Naypyitaw General Hospital', 'Kengtung General Hospital', 'Magway Regional Hospital',
'Yangon General Hospital', 'Sagaing General Hospital']
host_lst2 = ['Mawlamyine General Hospital', 'Myitkyina General Hospital']
for t in myan_df.reset_index().itertuples():
html=f'''<div style="font-size:9pt; background-color:steelblue; color:white;">
<div style="padding:3.5px 0; line-height:1.4;">
<b style="padding:0 7px;">Case_no
<span style="padding: 0 1px 0 30.75px;">:</span>
</b>{t.Case_no:02d}<br>
<b style="padding:0 7px;">Age
<span style="padding: 0 1px 0 54.35px;">:</span>
</b>{t.Age}<br>
<b style="padding:0 7px;">Gender
<span style="padding: 0 1px 0 36px;">:</span>
</b>{t.Gender}<br>
<b style="padding:0 7px;">Condition
<span style="padding: 0 1px 0 23.5px;">:</span>
</b>{t.Condition}<br>
<b style="padding:0 7px;">Infection_type
<span style="padding: 0 1px;">:</span>
</b>{t.Infection_type}<br>
<b style="padding:0 7px;">Nationality
<span style="padding: 0 1px 0 18px;">:</span>
</b>{t.Remark}<br>
<b style="padding:0 7px;">Hospital
<span style="padding: 0 1px 0 32px;">:</span>
</b>{t.Hospital}<br>
</div>
</div>
'''
width = (304 if t.Hospital == 'South Okkalapa Specialist Hospital' else 282
if t.Hospital in host_lst2 else 271 if t.Hospital in host_lst else 251)
ifram=folium.IFrame(html, width=width, height=135)
popup=folium.Popup(ifram)
icon=folium.Icon(color='green' if t.Condition == 'Recovery' else 'cadetblue'
if t.Condition != 'Death' else 'red')
folium.Marker([t.Lat, t.Long], popup=popup, icon=icon).add_to(cluster)
myan2_map
23-03-2020 မှ 06-05-2020 အထိမြန်မာနိင်ငံ၌ COVID-19 ရောဂါကူးစက်ခံရသောလူအရေအတွက်မှာ 161 ယောက်ဖြစ်ပြီး၊ 6 ဦးသေဆုံး၍ ရောဂါကင်းစင်သွားသူ 50 ဦးရှိပါသည်။ မြန်မာနိင်ငံ၌ COVID-19 ရောဂါကူးစက်ခံရသူများတွင် အသက် 1 နှစ် 6 လသည်အသက်အငယ်ဆုံးဖြစ်ပြီး အသက်အကြီးဆုံးမှာ 87 နှစ်ဖြစ်ကြောင်းတွေ့ရှိရသည်။တစ်နေ့လျှင်ပျမ်းမျှ 3.58 ယောက်ရောဂါကူးစက်ခံနေရပါသည်။ မြန်မာနိင်ငံ၌ COVID-19 ရောဂါကူးစက်ခံရမှု့အများဆုံးနေ့မှာ 14-04-2020 ဖြစ်ပြီးအရေအတွက်အားဖြင့် 22 ယောက်ဖြစ်ကြောင်းတွေ့ရှိရသည်။
ရောဂါကူးစက်ခံရသူအရေအတွက်အများဆုံးအသက်အပိုင်းအခြားမှာ 18.6 မှ 35.7 နှစ်အကြားဖြစ်ပြီး 66 (40.99%) ယောက်ဖြစ်ပါသည်။ ဒုတိယအများဆုံးမှာ 35.7 မှ 52.8 နှစ်အကြားဖြစ်ပြီး 45 (27.95%) ယောက်ဖြစ်ပါသည်။ ရောဂါကူးစက်ခံရမှု့၏ 53.42% မှာအမျိုးသားများဖြစ်ပြီး အမျိုးသမီးများ၏ရောဂါကူးစက်ခံရနှုန်းမှာ 46.58% ဖြစ်ပါသည်။
အသက် 18 နှစ်မှအထက်ရောဂါကူးစက်ခံရသောနှုန်းမှာ 95.65% ဖြစ်ပြီး အသက် 18 နှစ်အောက်ရောဂါကူးစက်ခံရသောနှုန်းမှာ 4.35% ဖြစ်ပါသည်။ မြန်မာနိင်ငံ၌ COVID-19 ရောဂါကြောင့်သေဆုံးနှုန်းမှာ 3.73% ဖြစ်ပြီး ရောဂါပျောက်ကင်းမှု့နှုန်းမှာ 31.06% ကြောင်းတွေ့ရှိရသည်။ ရောဂါကူးစက်ခံရသူများ၏ 16.77% သည်ပြည်ပမှကူးစက်ခံရသူများဖြစ်ပြီး ပြည်တွင်းကူးစက်ခံရသောနှုန်းမှာ 83.23% ဖြစ်ကြောင်းလေ့လာတွေ့ရှိရပါသည်။
မြန်မာနိင်ငံ၌ရောဂါကူးစက်ခံရသူအများဆုံးရှိသောဒေသမှာ ရန်ကုန်တိုင်းဒေသကြီးဖြစ်ပြီး 126 (78.26%) ယောက်ဖြစ်ပါသည်။ ရန်ကုန်တိုင်းဒေသကြီးတွင် အင်းစိန်မြို့နယ်သည် ရောဂါဖြစ်ပွါးမှု့အများဆုံးဖြစ်ပြီး အရေအတွက်အားဖြင့် 31 ယောက်ဖြစ်ပါသည်။



c_no_str = ''
myan_iter = myan_df.query("Condition=='Recovery'").index
for c_no in myan_iter:
c_no_str += f'C_{c_no}, '
Author: MIN KYAW ZAW
E-mail: minkyawzraw@gmail.com
LinkedIn: www.linkedin.com/in/minkyawzaw